import config from './request.config'

export default function(url, data={}, method='GET') {
	
	// 成功，失败
	return new Promise((resolve, reject) => {
		wx.request({
			url: config.host3 + url,
			data,
			method,
			success(res) {
				resolve(res);
			},
			fail(err) {
				reject(err);
			}
		})
	})
}